﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EPiServer.DataAbstraction;

namespace Dropit.BlogPageProvider
{
	public static class Settings
	{
		private static PlugIn.BlogSettings _settings;
		private static object _settingsLock = new object();

		private static PlugIn.BlogSettings BlogSettings
		{
			get
			{
				if (_settings == null)
				{
					lock (_settingsLock)
					{
						if (_settings == null)
						{
							_settings = new PlugIn.BlogSettings();
							EPiServer.PlugIn.PlugInSettings.AutoPopulate(_settings);
						}
					}
				}
				return _settings;
			}
		}

		public static int BlogSettingsPageTypeId
		{
			get { return BlogSettings.BlogSettingsPageTypeId; }
		}

		public static int BlogPageTypeId
		{
			get { return BlogSettings.BlogPageTypeId; }
		}

		public static int PostPageTypeId
		{
			get { return BlogSettings.BlogPostPageTypeId; }
		}

		public static int CommentPageTypeId
		{
			get { return BlogSettings.BlogCommentPageTypeId; }
		}
	}
}
